@extends('admin.main')
@section('content')

    <div id="dcMain">
        <!-- 当前位置 -->
        <div id="urHere">管理中心<b>></b><strong>商品分类</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <h3><a href="/category/add" class="actionBtn add">添加分类</a>商品分类</h3>
            @if (count($errors) > 0)
                <div class="error">
                    {{$errors->first()}}
                </div>
            @endif
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <th width="30" align="left">ID</th>
                    <th width="80" align="left">分类名称</th>
                    <th width="30" align="center">状态</th>
                    <th width="30" align="center">排序</th>
                    <th width="80" align="center">操作</th>
                </tr>
                @foreach($data as $item)
                <tr>
                    <td align="left">{{$item['id']}}</td>
                    <td>{{$item['category_name']}}</td>
                    <td align="center">{{config('admin.category.status')[$item['status']]}}</td>
                    <td align="center">{{$item['sort']}}</td>
                    <td align="center"><a href="/category/edit/{{$item['id']}}">编辑</a> | <a href="javascript:if(confirm('确实要删除吗?'))location='/category/delete/{{$item['id']}}'">删除</a></td>
                </tr>
                @endforeach
            </table>
            @include('admin.layouts.page')
        </div>
    </div>
@stop